﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

namespace ProjectSem40701.Util
{
    public class CheckActiveRound
    {
        //Kiểm tra xem có vòng thi nào active đang tồn tại hay không
        public bool IsExistRound(int examID)
        {
            bool ok = false;
            try
            {
                MainDataset.RoundTableAdapters.tbl_RoundTableAdapter dpRoundActive = new
                   MainDataset.RoundTableAdapters.tbl_RoundTableAdapter();
                DataTable dttblRoundActive =
                    dpRoundActive.Get_tbl_Round_Select_All_Active_By_ExamID(examID);

                if (dttblRoundActive.Rows.Count > 0)
                {
                    ok = true;
                }
                return ok;
            }
            catch
            {
                return false;
            }
        }
    }
}
